import request from "@/utils/request.js";

export const invoicePagingApi = (data) => {
	let option = {
		method: "POST",
		loading: true,
	};
	return request('api/sale/invoice/paging', data, option)
}

export const titleListApi = (data) => {
	let option = {
		method: "POST",
		loading: true,
	};
	return request('api/sale/invoice/title/list', data, option)
}

export const titleAddApi = (data) => {
	let option = {
		method: "POST",
		loading: true,
	};
	return request('api/sale/invoice/title', data, option)
}

export const titleEditApi = (data) => {
	let option = {
		method: "PUT",
		loading: true,
	};
	return request('api/sale/invoice/title', data, option)
}
export const titleDetailApi = (id) => {
	let option = {
		method: "GET",
		loading: true,
	};
	return request('api/sale/invoice/title/' + id, {}, option)
}
export const titleDelApi = (id) => {
	let option = {
		method: "DELETE",
		loading: true,
	};
	return request('api/sale/invoice/title/' + id, {}, option)
}


export const invoiceDetailApi = (id) => {
	let option = {
		method: "GET",
		loading: true,
	};
	return request('api/sale/invoice/' + id, {}, option)
}
